package com.example.aop.proxy;

public class proxyHouse implements HouseSubject{
    private ResultHouse resultHouse;

    public proxyHouse(ResultHouse resultHouse) {
        this.resultHouse = resultHouse;
    }

    @Override
    public void rentHouse() {
        System.out.println("我是中介，开始代理");
        resultHouse.rentHouse();
        System.out.println("我是中介，结束代理");
    }

    @Override
    public void outHouse() {
        System.out.println("我是中介，开始代理");
        resultHouse.outHouse();
        System.out.println("我是中介，结束代理");
    }

}
